#ifndef __LB_H_
#define __LB_H_

#define FEQ_0(P,u,v,w,rgama)  (P/3 - 0.5*(u*u+v*v+w*w)*rgama)
#define FEQ_1(P,u,v,w,rgama)  (P/18 + u/6 + u*u*rgama/6 - (v*v+w*w)*rgama/12)
#define FEQ_2(P,u,v,w,rgama)  (P/18 - u/6 + u*u*rgama/6 - (v*v+w*w)*rgama/12) 
#define FEQ_3(P,u,v,w,rgama)  (P/18 + v/6 + v*v*rgama/6 - (u*u+w*w)/12)  
#define FEQ_4(P,u,v,w,rgama)  (P/18 - v/6 + v*v*rgama/6 - (u*u+w*w)/12) 
#define FEQ_5(P,u,v,w,rgama)  (P/18 + w/6 + w*w*rgama/6 - (u*u+v*v)/12) 
#define FEQ_6(P,u,v,w,rgama)  (P/18 - w/6 + w*w*rgama/6 - (u*u+v*v)/12) 
#define FEQ_7(P,u,v,w,rgama)  (P/36 + ( v+w)/12 + ((v*v+w*w)/12 + v*w/4 - u*u/24)*rgama)
#define FEQ_8(P,u,v,w,rgama)  (P/36 + (-v-w)/12 + ((v*v+w*w)/12 + v*w/4 - u*u/24)*rgama)
#define FEQ_9(P,u,v,w,rgama)  (P/36 + (-v+w)/12 + ((v*v+w*w)/12 - v*w/4 - u*u/24)*rgama)
#define FEQ_10(P,u,v,w,rgama) (P/36 + ( v-w)/12 + ((v*v+w*w)/12 - v*w/4 - u*u/24)*rgama)
#define FEQ_11(P,u,v,w,rgama) (P/36 + (-u-w)/12 + ((u*u+w*w)/12 + u*w/4 - v*v/24)*rgama)
#define FEQ_12(P,u,v,w,rgama) (P/36 + ( u+w)/12 + ((u*u+w*w)/12 + u*w/4 - v*v/24)*rgama)
#define FEQ_13(P,u,v,w,rgama) (P/36 + (-u+w)/12 + ((u*u+w*w)/12 - u*w/4 - v*v/24)*rgama)
#define FEQ_14(P,u,v,w,rgama) (P/36 + (u-w)/12 + ((u*u+w*w)/12 - u*w/4 - v*v/24)*rgama)
#define FEQ_15(P,u,v,w,rgama) (P/36 + (-u+v)/12 + ((u*u+v*v)/12 - u*v/4 - w*w/24)*rgama)
#define FEQ_16(P,u,v,w,rgama) (P/36 + ( u-v)/12 + ((u*u+v*v)/12 - u*v/4 - w*w/24)*rgama)
#define FEQ_17(P,u,v,w,rgama) (P/36 + (-u-v)/12 + ((u*u+v*v)/12 + u*v/4 - w*w/24)*rgama)
#define FEQ_18(P,u,v,w,rgama) (P/36 + ( u+v)/12 + ((u*u+v*v)/12 + u*v/4 - w*w/24)*rgama)
//-------------------------------------------------------------------------------------------------------------------------
#define MEQ_0(P,u,v,w,rgama)  (P)
#define MEQ_1(P,u,v,w,rgama)  (-11.0*P+19.0*(u*u+v*v+w*w)*rgama)
#define MEQ_2(P,u,v,w,rgama)  (3.0*P-5.5*(u*u+v*v+w*w)*rgama)
#define MEQ_3(P,u,v,w,rgama)  (u)
#define MEQ_4(P,u,v,w,rgama)  (-2.0*u/3)
#define MEQ_5(P,u,v,w,rgama)  (v)
#define MEQ_6(P,u,v,w,rgama)  (-2.0*v/3)
#define MEQ_7(P,u,v,w,rgama)  (w)
#define MEQ_8(P,u,v,w,rgama)  (-2.0*w/3)
#define MEQ_9(P,u,v,w,rgama)  ((2.0*u*u-v*v-w*w)*rgama)
#define MEQ_10(P,u,v,w,rgama) ((-u*u+(v*v+w*w)*0.5)*rgama)
#define MEQ_11(P,u,v,w,rgama) ((v*v-w*w)*rgama)
#define MEQ_12(P,u,v,w,rgama) (((-v*v+w*w)*0.5)*rgama)
#define MEQ_13(P,u,v,w,rgama) (u*v*rgama)
#define MEQ_14(P,u,v,w,rgama) (v*w*rgama)
#define MEQ_15(P,u,v,w,rgama) (u*w*rgama)
#define MEQ_16(P,u,v,w,rgama) (0.0)
#define MEQ_17(P,u,v,w,rgama) (0.0)
#define MEQ_18(P,u,v,w,rgama) (0.0)
//--------------------------------------------------------------------------------------------------------------------------
#define F_0(u,v,w,Fx,Fy,Fz,rgama)  (0.0)
#define F_1(u,v,w,Fx,Fy,Fz,rgama)  (38.0*(u*Fx+v*Fy+w*Fz)*rgama)
#define F_2(u,v,w,Fx,Fy,Fz,rgama)  (-11.0*(u*Fx+v*Fy+w*Fz)*rgama)
#define F_3(u,v,w,Fx,Fy,Fz,rgama)  (Fx)
#define F_4(u,v,w,Fx,Fy,Fz,rgama)  (-2.0*Fx/3)
#define F_5(u,v,w,Fx,Fy,Fz,rgama)  (Fy)
#define F_6(u,v,w,Fx,Fy,Fz,rgama)  (-2.0*Fy/3)
#define F_7(u,v,w,Fx,Fy,Fz,rgama)  (Fz)
#define F_8(u,v,w,Fx,Fy,Fz,rgama)  (-2.0*Fz/3)
#define F_9(u,v,w,Fx,Fy,Fz,rgama)  (2.0*(2.0*u*Fx-v*Fy-w*Fz)*rgama)
#define F_10(u,v,w,Fx,Fy,Fz,rgama) (-(2.0*u*Fx-v*Fy-w*Fz)*rgama)
#define F_11(u,v,w,Fx,Fy,Fz,rgama) (2.0*(v*Fy-w*Fz)*rgama)
#define F_12(u,v,w,Fx,Fy,Fz,rgama) (-(v*Fy-w*Fz)*rgama)
#define F_13(u,v,w,Fx,Fy,Fz,rgama) ((v*Fx+u*Fy)*rgama)
#define F_14(u,v,w,Fx,Fy,Fz,rgama) ((w*Fy+v*Fz)*rgama)
#define F_15(u,v,w,Fx,Fy,Fz,rgama) ((w*Fx+u*Fz)*rgama)
#define F_16(u,v,w,Fx,Fy,Fz,rgama) (0.0)
#define F_17(u,v,w,Fx,Fy,Fz,rgama) (0.0)
#define F_18(u,v,w,Fx,Fy,Fz,rgama) (0.0)
//--------------------------------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------------------------------
#endif
